package com.redtea.studyspringboot.core.domain;

import lombok.Data;

import java.io.Serializable;

/**
 * @program: StudySpringBoot
 * @ClassName BaseVo
 * @author: LGP
 * @create: 2024-04-17 13:54
 * @description:
 **/

public class R<T> implements Serializable {
    private int code;
    private String msg;
    private T data;

    public R() {
    }

    public R(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static class HttpStatus{
        public final static int OK=200;
        public final static String STR_SUCCESS="请求成功";
        public final static int ERROR=500;
        public final static String STR_FAIL="请求失败";
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
